import App from './App.vue'
import menus from "./menus.js";


Vue.prototype.$rxRouter.init(menus,{
  onBeforeExit:function(){
    var  resolve,
      reject,
      promise=new Promise((res,rej)=>{
        resolve=res;
        reject=rej;
      });
      setTimeout(()=>{
        if(confirm('是否退出系统?')){
        resolve()
      }else{
        reject()
      }
      },1000)
      return promise
  }
})


var vm=new Vue({
  el:'#app',
  template:'<App/>',
  components:{
    App
  }
});
